<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p id="date"></p>
<script type="text/javascript">
    let date = new Date();
    let str =  date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
    document.getElementById("date").innerHTML = "现在时间:"+str;

    // Math.floor(Math.random() * (max-min + 1) + min); // min - max 之间随机数
    // Math.ceil(Math.random()*n )- 1; //0-n 之间随机数
</script>
</body>
</html>